package com.qfedu.yuxiaoer.service.impl;

import com.qfedu.yuxiaoer.dto.SourceresourcesDto;
import com.qfedu.yuxiaoer.entity.SourceOwner;
import com.qfedu.yuxiaoer.mapper.SourceOwnerMapper;
import com.qfedu.yuxiaoer.service.SourceownerService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SourceownerServiceImpl implements SourceownerService {

    @Autowired
    private SourceOwnerMapper sourceOwnerMapper;
    @Override
    public int insertSourceowner(SourceresourcesDto sourceresourcesDto) {
        SourceOwner sourceOwner = new SourceOwner();
        BeanUtils.copyProperties(sourceresourcesDto,sourceOwner);
        sourceOwnerMapper.insertSelective(sourceOwner);
        Integer id = sourceOwner.getId();
        return id;


    }
}
